import type { App } from 'vue';
import { Button } from './Button';
import { Input } from './Input';
import {
  // Need
  Affix,
  Anchor,
  AutoComplete,
  Alert,
  Avatar,
  BackTop,
  Badge,
  Button as AntButton,
  Breadcrumb,
  Calendar,
  Card,
  Collapse,
  Carousel,
  Cascader,
  Checkbox,
  Col,
  Comment,
  DatePicker,
  Descriptions,
  Divider,
  Dropdown,
  Drawer,
  Empty,
  Form,
  Image,
  Layout,
  List,
  Mentions,
  Statistic,
  Pagination,
  Popover,
  Progress,
  Radio,
  Rate,
  Result,
  Row,
  Select,
  Skeleton,
  Slider,
  Space,
  Spin,
  Steps,
  Switch,
  Transfer,
  Tabs,
  Tag,
  Timeline,
  Tooltip,
  Typography,
  Upload,
  Input as AInput,
  InputNumber as AInputNumber,
} from 'ant-design-vue';
import VXETable from 'vxe-table';

const compList = [
  Affix,
  Anchor,
  Anchor.Link,
  AntButton.Group,
  AutoComplete,
  Alert,
  Avatar,
  Avatar.Group,
  BackTop,
  Badge,
  Badge.Ribbon,
  Breadcrumb,
  Breadcrumb.Item,
  Breadcrumb.Separator,
  Calendar,
  Card,
  Card.Grid,
  Card.Meta,
  Collapse,
  Collapse.Panel,
  Carousel,
  Cascader,
  Checkbox,
  Checkbox.Group,
  Col,
  Comment,
  DatePicker,
  DatePicker.MonthPicker,
  DatePicker.QuarterPicker,
  DatePicker.RangePicker,
  DatePicker.TimePicker,
  DatePicker.WeekPicker,
  DatePicker.YearPicker,
  Descriptions,
  Descriptions.Item,
  Divider,
  Dropdown,
  Dropdown.Button,
  Drawer,
  Empty,
  Form,
  Form.Item,
  Form.ItemRest,
  Image,
  AInput,
  AInput.Group,
  AInput.Password,
  AInput.Search,
  AInput.TextArea,
  AInputNumber,
  List,
  Mentions,
  Statistic,
  Statistic.Countdown,
  Pagination,
  Popover,
  Progress,
  Radio,
  Radio.Button,
  Radio.Group,
  Rate,
  Result,
  Row,
  Select,
  Select.OptGroup,
  Select.Option,
  Skeleton,
  Skeleton.Button,
  Skeleton.Avatar,
  Skeleton.Image,
  Skeleton.Input,
  Slider,
  Space,
  Spin,
  Steps,
  Steps.Step,
  Switch,
  Transfer,
  Tabs,
  Tabs.TabPane,
  Tag,
  Tag.CheckableTag,
  Timeline,
  Timeline.Item,
  Tooltip,
  Typography,
  Typography.Link,
  Typography.Paragraph,
  Typography.Text,
  Typography.Title,
  Upload,
  Upload.Dragger,
];

export function registerGlobComp(app: App) {
  compList.forEach((comp) => {
    app.component(comp.name || comp.displayName, comp);
  });

  app.use(Input).use(Button).use(Layout).use(VXETable);
}
